

### 0个return: 默认return None
def mysum(x, y):
    print(x+y)
result = mysum(1,2)
print(result)


#### 1个return
def mysum(x,y):
    total = x+y
    print("total is ",total)
    return total
result = mysum(7,8)
print(result)


#### 多个return语句
## 遇到第一个return的时候，函数退出

def maximum(x, y):
    if x > y:
        return x
    else:
        return y
result = maximum(5, 3)
print(result)


#### 返回多个值
def shopping(money):
    money2 = money-100
    shoppinglist = ["apple", 'pear']
    return money2, shoppinglist


money,shoppinglist = shopping(1000)
print(money, shoppinglist)
result = shopping(1000)
print(result)